

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Feed &mdash; vt-py  documentation</title>
  

  
  
  
  

  
  <script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
        <script type="text/javascript" src="../_static/jquery.js"></script>
        <script type="text/javascript" src="../_static/underscore.js"></script>
        <script type="text/javascript" src="../_static/doctools.js"></script>
        <script type="text/javascript" src="../_static/language_data.js"></script>
    
    <script type="text/javascript" src="../_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Object" href="object.html" />
    <link rel="prev" title="Client" href="client.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../index.html" class="icon icon-home"> vt-py
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../howtoinstall.html">How to install</a></li>
<li class="toctree-l1"><a class="reference internal" href="../overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../quickstart.html">Quickstart</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../apireference.html">API reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="client.html">Client</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Feed</a></li>
<li class="toctree-l2"><a class="reference internal" href="object.html">Object</a></li>
<li class="toctree-l2"><a class="reference internal" href="iterator.html">Iterator</a></li>
<li class="toctree-l2"><a class="reference internal" href="utils.html">Utilities</a></li>
</ul>
</li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../index.html">vt-py</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../index.html">Docs</a> &raquo;</li>
        
          <li><a href="../apireference.html">API reference</a> &raquo;</li>
        
      <li>Feed</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="../_sources/api/feed.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="feed">
<h1>Feed<a class="headerlink" href="#feed" title="Permalink to this headline">¶</a></h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This feature is available only for premium users.</p>
</div>
<dl class="class">
<dt>
<em class="property">class </em><code class="sig-prename descclassname">vt.</code><code class="sig-name descname">Feed</code><span class="sig-paren">(</span><em class="sig-param">client</em>, <em class="sig-param">feed_type</em>, <em class="sig-param">cursor=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/vt/feed.html#Feed"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Feed represents a stream of objects received from VirusTotal in real-time.</p>
<p>For more information about VirusTotal Feeds see:
<a class="reference external" href="https://developers.virustotal.com/v3.0/reference#feeds">https://developers.virustotal.com/v3.0/reference#feeds</a></p>
<p>In the example below the loop iterates forever, retrieving file objects as
they are processed by VirusTotal. For a more elaborate example see the file
examples/file_feed.py in this repository.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="k">with</span> <span class="n">vt</span><span class="o">.</span><span class="n">Client</span><span class="p">(</span><span class="o">&lt;</span><span class="n">apikey</span><span class="o">&gt;</span><span class="p">)</span> <span class="k">as</span> <span class="n">client</span><span class="p">:</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">file_obj</span> <span class="ow">in</span> <span class="n">client</span><span class="o">.</span><span class="n">feed</span><span class="p">(</span><span class="n">vt</span><span class="o">.</span><span class="n">FeedType</span><span class="o">.</span><span class="n">FILES</span><span class="p">):</span>
<span class="gp">&gt;&gt;&gt; </span>  <span class="nb">print</span><span class="p">(</span><span class="n">file_obj</span><span class="o">.</span><span class="n">id</span><span class="p">)</span>
</pre></div>
</div>
<p>Instances of this class are not created directly, you should use the
<a class="reference internal" href="client.html#vt.Client.feed" title="vt.Client.feed"><code class="xref py py-func docutils literal notranslate"><span class="pre">vt.Client.feed()</span></code></a> method instead.</p>
<dl class="method">
<dt>
<em class="property">property </em><code class="sig-name descname">cursor</code></dt>
<dd><p>Returns a cursor indicating the last item retrieved from the feed.</p>
<p>This cursor can be used for creating a new Feed object that continues where
a previous one left.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><code class="sig-prename descclassname">vt.</code><code class="sig-name descname">FeedType</code><a class="reference internal" href="../_modules/vt/feed.html#FeedType"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Feed types.</p>
<dl class="attribute">
<dt>
<code class="sig-name descname">FILES</code><em class="property"> = 'files'</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<code class="sig-name descname">URLS</code><em class="property"> = 'urls'</em></dt>
<dd></dd></dl>

</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="object.html" class="btn btn-neutral float-right" title="Object" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="client.html" class="btn btn-neutral float-left" title="Client" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2019, VirusTotal

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>